Conversation
There was a problem hiding this comment.
Pull request overview
Updates the codebase to align with newer Ruff linting expectations, primarily through import style normalization and small refactors that simplify control flow without changing behavior.
Changes:
- Normalize imports (e.g.,
from pytools import obj_array,from matplotlib import cm,from pyvisfile import vtk, etc.) across tests, examples, and library modules. - Apply small simplifications/refactors (direct
return, list comprehensions, simplified asserts, minor loop simplification). - Update lint configuration to ignore a few additional Ruff rules and add per-file ignores for
S102in docs/tests.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
test/test_visualization.py |
Switch pytools.obj_array import style to satisfy lint/import conventions. |
test/test_refinement.py |
Normalize matplotlib colormap import (from matplotlib import cm). |
test/test_meshmode.py |
Normalize obj_array import and simplify dimension assertion. |
test/test_chained.py |
Simplify helpers by returning constructed values directly. |
test/test_array.py |
Normalize obj_array import style. |
pyproject.toml |
Adjust Ruff ignore list and add per-file ignores for S102 in docs/tests. |
meshmode/mesh/visualization.py |
Replace manual loop appends with a generator-based extend. |
meshmode/mesh/tools.py |
Simplify returns and inline temporary variables. |
meshmode/mesh/processing.py |
Minor dict-iteration simplification (for k in dict). |
meshmode/mesh/generation.py |
Return glue_mesh_boundaries(...) directly for periodic meshes. |
meshmode/interop/firedrake/mesh.py |
Normalize Firedrake dmcommon import style. |
meshmode/discretization/visualization.py |
Normalize imports and simplify connectivity equality check; normalize optional imports. |
meshmode/discretization/connection/projection.py |
Replace manual list-building loops with list comprehensions. |
meshmode/discretization/connection/chained.py |
Replace manual list-building loop with list comprehension. |
meshmode/discretization/__init__.py |
Normalize obj_array import style. |
meshmode/array_context.py |
Inline return for DAG transform result. |
examples/simple-dg.py |
Normalize imports and simplify branching for face-embedding selection. |
examples/parallel-vtkhdf.py |
Use __name__ for logger name (module logger best practice). |
examples/moving-geometry.py |
Normalize obj_array import style. |
examples/from_firedrake.py |
Normalize matplotlib colormap import (from matplotlib import cm). |
.basedpyright/baseline.json |
Update basedpyright baseline ranges/codes to match current analysis output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.